package com.zjn.servicea.service.feign;


import com.zjn.entity.User;
import com.zjn.entity.UserInfoReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author zaker
 * @program: signit_parent
 * @date 2021-03-30 13:47
 */
@FeignClient(name = "servicea", contextId ="ServiceAFeign")
public interface ServiceAFeign {

    /*
    * 更新用户信息
    * */
    @PostMapping("/updateuser")
    public String UpdateUserInfo(@RequestBody User user);

    /*
    *
    *获得用户信息
    * */
    @GetMapping("/getInfoAll")
    public @ResponseBody String getInfoAll(@RequestBody UserInfoReq userInfoReq,
                                           @RequestParam(name = "offset", required = false, defaultValue = "0") Integer offset,
                                           @RequestParam(name = "limit", required = false, defaultValue = "20") Integer limit);

    /*
    * 创建新用户
    *
    * */
    @PostMapping("/createUser")
    public String createUser(@RequestBody UserInfoReq userInfoReq);
}
